<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>产品管理系统</title>
    <meta http-equiv="refresh" content="5; url=/user/list">
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            padding: 50px;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 600px;
            margin: 0 auto;
            background: white;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 0 15px rgba(0,0,0,0.1);
        }
        h1 {
            color: #333;
            margin-bottom: 20px;
        }
        .loading {
            font-size: 18px;
            color: #666;
            margin: 20px 0;
        }
        .spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-left-color: #4CAF50;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .countdown {
            font-size: 24px;
            font-weight: bold;
            color: #2196F3;
            margin: 15px 0;
        }
        .link-container {
            margin-top: 25px;
        }
        .link {
            color: #2196F3;
            text-decoration: none;
            font-weight: bold;
            padding: 10px 20px;
            border: 1px solid #2196F3;
            border-radius: 4px;
            display: inline-block;
            transition: all 0.3s;
        }
        .link:hover {
            background: #2196F3;
            color: white;
        }
        .skip-link {
            margin-top: 15px;
            display: block;
            color: #666;
        }
    </style>
    <script>
        // 显示倒计时效果
        var seconds = 5;
        function updateCountdown() {
            seconds--;
            if(seconds >= 0) {
                document.getElementById('countdown').innerHTML = seconds;
                setTimeout(updateCountdown, 1000);
            }
        }

        // 页面加载完成后启动倒计时
        window.onload = function() {
            // 启动倒计时
            updateCountdown();
        };

        // 手动跳转函数
        function redirectNow() {
            window.location.href = "/user/list";
        }
    </script>
</head>
<body>
<div class="container">
    <h1>产品管理系统</h1>
    <div class="spinner"></div>
    <div class="loading">系统将在 <span id="countdown" class="countdown">5</span> 秒后自动跳转</div>

    <div class="link-container">
        <a href="javascript:redirectNow()" class="link">立即进入产品列表</a>
        <a href="/user/list" class="skip-link">或等待自动跳转</a>
    </div>
</div>
</body>
</html>